﻿<%@ Page Title="View Profile" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="ViewProfile.aspx.cs" Inherits="StudentHookups.Account.Profile.ViewProfile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="userdata">
        <h1 id="myprofileheader">
            Displaying profile</h1>
        <ol class="userinformation">
            <li>
                <asp:Label ID="Fullname" runat="server" Text="Fullname"></asp:Label></li>
            <li>
                <asp:Label ID="Accountname" runat="server" Text="Accountname"></asp:Label></li>
            <li>
                <asp:Label ID="Age" runat="server" Text="Age"></asp:Label></li>
            <li>
                <asp:Label ID="Gender" runat="server" Text="Gender"></asp:Label></li>
            <li><b>Information:</b>
                <asp:TextBox ID="tbInfo" runat="server" CssClass="tbInformation" TextMode="MultiLine"
                    MaxLength="2" Rows="6" Enabled="True" ReadOnly="True"></asp:TextBox>
            </li>
        </ol>
    </div>
    <div class="ImagePlacement">
        <asp:Image CssClass="ProfileImage" ID="ProfileImage" runat="server" AlternateText="Please Submit an image" />
        <p>
            <asp:Button ID="btnFriend" runat="server" Text="Add as friend" OnClick="btnFriend_Click" />
            <asp:Label ID="lblFriends" runat="server" Text=""></asp:Label>
        </p>
    </div>
    <div class="msgPlacement">
        <fieldset class="sendMessage">
            <legend>Send Message</legend>
            <asp:TextBox ID="tbSendMessage" CssClass="tbInformation" runat="server" TextMode="MultiLine"
                MaxLength="2" Rows="6"></asp:TextBox>
            <asp:RequiredFieldValidator ID="rfvSendMessage" ControlToValidate="tbSendMessage"
                ValidationGroup="sendMsg" runat="server" ErrorMessage="Please write a message before sending">*
            </asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="revTbInformation"
                CssClass="failureNotification" ControlToValidate="tbSendMessage" runat="server"
                ErrorMessage="Not a valid message please check length and valid characterss"
                ValidationExpression="^[\S\s]{10,280}$" ValidationGroup="sendMsg">*</asp:RegularExpressionValidator>
            <p>
                <asp:Button ID="btnCancelMsg" runat="server" Text="Cancel" OnClick="btnCancelMsg_Click" />
                <asp:Button ID="btnSendMsg" runat="server" Text="Send" ValidationGroup="sendMsg"
                    OnClick="btnSendMsg_Click" /></p>
            <asp:ValidationSummary ID="vsSendMsg" ValidationGroup="sendMsg" runat="server" />
            <p>
                <asp:Label ID="lblmsgInfo" runat="server" Text=""></asp:Label></p>
        </fieldset>
    </div>
    <div class="profileWall">
        <fieldset>
            <legend>Profile Wall</legend>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="profileWall" runat="server">
                <ContentTemplate>
                    <asp:GridView runat="server" ID="gridWall" CssClass="gridWall" AutoGenerateColumns="false">
                        <Columns>
                            <asp:BoundField DataField="title" HeaderText="Title" />
                            <asp:BoundField DataField="message" HeaderText="Message" />
                            <asp:BoundField DataField="sender" HeaderText="Sender" />
                        </Columns>
                    </asp:GridView>
                    <br />
                    <div class="postOnWall">
                        <p>
                            <b>Title:</b><asp:TextBox ID="tbWallTitle" runat="server"></asp:TextBox></p>
                        <asp:RequiredFieldValidator ID="rfvWallTitle" ControlToValidate="tbWallTitle"
                            ValidationGroup="postOnWall" runat="server" ErrorMessage="Please write a title before sending">*
                        </asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="REVWallTitle"
                            CssClass="failureNotification" ControlToValidate="tbSendMessage" runat="server"
                            ErrorMessage="Too long title"
                            ValidationExpression="^[\S\s]{0,20}$" ValidationGroup="postOnWall">*</asp:RegularExpressionValidator>
                        <p>
                            <b>Message:</p>
                        <asp:TextBox ID="tbWallMessage" runat="server" MaxLength="57" Width="400"></asp:TextBox></p>
                        <asp:RequiredFieldValidator ID="rfvWallMessage" ControlToValidate="tbWallMessage"
                            ValidationGroup="postOnWall" runat="server" ErrorMessage="Please write a message before sending">*
                        </asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="revTbWallMessage"
                            CssClass="failureNotification" ControlToValidate="tbWallMessage" runat="server"
                            ErrorMessage="Not a valid message please check length and valid characterss"
                            ValidationExpression="^[\S\s]{0,57}$" ValidationGroup="postOnWall">*</asp:RegularExpressionValidator>
                        <asp:Button ID="btnCancelPost" runat="server" Text="Cancel" OnClick="btnCancelPost_Click" />
                        <asp:Button ID="btnPostWall" runat="server" Text="Post" OnClick="Button2_Click" ValidationGroup="postOnWall" />
                        <p>
                            <asp:ValidationSummary ID="tbWallValidation" ValidationGroup="postOnWall" runat="server" /> </p>
                    </div>
                    </b>
                </ContentTemplate>
            </asp:UpdatePanel>
        </fieldset>
    </div>
</asp:Content>
